 

function crewSchedulingCtrl($scope, $http, ngDialog) {
  'ngInject';

  // 带班日志信息
  this.crewSchedulingList = [
    {
      id: '1',
      timer: "2016-05-03",
      crew: "ZD-1班次",
      crewPeople: "值班人1"
    },
    {
      id: '2',
      timer: "2016-05-03",
      crew: "ZD-2班次",
      crewPeople: "值班人2"
    },
    {
      id: '3',
      timer: "2016-05-03",
      crew: "ZD-3班次",
      crewPeople: "值班人4"
    },
  ];

  // 新增带班日志信息
  this.addCrewLog = function() {
    ngDialog.open({
      template: 'addCrewLog',
      className: 'ngdialog-theme-default pa-special-check-item-list-theme',
      scope: $scope,
      controllerAs: 'crewAddtion',
      controller: function($scope) {
        'ngInject';
        this.submit = () => {
          $http.post(`${SERVER_CONTEXT}/api/dutyRosterLog/insertDutyRosterLogInfo`,
            this.logData)
              .then((resp) => {
                if (resp.data.success) {
                  layer.msg('新增成功');
                } else {
                  layer.alert(resp.data.message);
                }
              });
        }
      },
    });
  };

}

export default crewSchedulingCtrl;